def center_title(title, width):
    """使用给定的宽度返回居中格式的标题。"""
    num_spaces = width - len(title)
    spaces_per_side = (num_spaces // 2) * " "

    return spaces_per_side + title + spaces_per_side

screen_size = 25
print(center_title("博物馆", screen_size))
print(center_title("人民大道356号", screen_size))
print(center_title("出发!", screen_size))